import request from '@/utils/request'

// 查询车辆出险列表
export function listOutInsurance(query) {
  return request({
    url: '/maintenance/outInsurance/list',
    method: 'get',
    params: query
  })
}

// 查询车辆出险详细
export function getOutInsurance(id) {
  return request({
    url: '/maintenance/outInsurance/' + id,
    method: 'get'
  })
}

// 新增车辆出险
export function addOutInsurance(data) {
  return request({
    url: '/maintenance/outInsurance',
    method: 'post',
    data: data,
    mmv: true,
  })
}

// 修改车辆出险
export function updateOutInsurance(data) {
  return request({
    url: '/maintenance/outInsurance',
    method: 'put',
    data: data,
    mmv:true,
  })
}

// 删除车辆出险
export function delOutInsurance(id) {
  return request({
    url: '/maintenance/outInsurance/' + id,
    method: 'delete'
  })
}

// 导出车辆出险
export function exportOutInsurance(query) {
  return request({
    url: '/maintenance/outInsurance/export',
    method: 'get',
    params: query
  })
}

// 下载导入模板
export function importTemplate() {
  return request({
    url: '/maintenance/outInsurance/importTemplate',
    method: 'get'
  })
}
